package com.liuqing.www.web服务;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;

import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;
public class XireClientnouser {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Service srvcModel = new ObjectServiceFactory()
        .create(IHelloService.class);
XFireProxyFactory factory = new XFireProxyFactory(XFireFactory
        .newInstance().getXFire());

 String helloWorldURL = "http://192.168.1.34:8080/XireWebServer/services/MYHelloService";
try {
     IHelloService srvc = (IHelloService) factory.create(srvcModel,
             helloWorldURL);
// System.out.println(srvc.sayHello("Robin"));
     
    User u=new User();
    u.setName("RRRRR");
    Course c=srvc.choose();
    System.out.println(c.getName());
    
 } catch (MalformedURLException e) {
     e.printStackTrace();
 }

	}

}
